<template>
  <div class="title_main">
    <div class="title_main_inside">
      <p>小游戏</p>

      <div class="title_main_inside_controls">

        <div class="title_main_inside_controls_button" onclick="alert('请使用组合键Ctrl+D来收藏本站！')">
          <span>收藏本站</span>
          <div class="title_main_inside_controls_button_decline"></div>
        </div>

        <div class="title_main_inside_controls_fengexian">
          <div class="title_main_inside_controls_fengexian_inside"></div>
        </div>

        <div class="title_main_inside_controls_button" onclick="alert('QQ:2367075171')">
          <span>联系作者</span>
          <div class="title_main_inside_controls_button_decline"></div>
        </div>

        <div class="title_main_inside_controls_button" onclick="window.open('gameTypesMoNiJingYing.html','_self')">
          <span>模拟经营</span>
          <div class="title_main_inside_controls_button_decline"></div>
        </div>

        <div class="title_main_inside_controls_button" onclick="window.open('gameTypesYiZhiYouXi.html','_self')">
          <span>益智游戏</span>
          <div class="title_main_inside_controls_button_decline"></div>
        </div>

        <div class="title_main_inside_controls_button" onclick="window.open('gameTypesDongZuoMaoXian.html','_self')">
          <span>动作冒险</span>
          <div class="title_main_inside_controls_button_decline"></div>
        </div>

        <div class="title_main_inside_controls_button" onclick="window.open('gameTypes.html','_self')">
          <span>解谜游戏</span>
          <div class="title_main_inside_controls_button_decline"></div>
        </div>

<!--        <div class="title_main_inside_controls_button">-->
<!--          <span>热门游戏</span>-->
<!--          <div class="title_main_inside_controls_button_decline"></div>-->
<!--        </div>-->

        <div class="title_main_inside_controls_button" onclick="window.open('index.html','_self')">
          <span>首页</span>
          <div class="title_main_inside_controls_button_decline"></div>
        </div>

      </div>

    </div>
  </div>
</template>

<script>
export default {
  name: "AppTitle",

  props:{
    selectedButton:{
      type:Number,

    }
  },

  mounted() {
    var title_control_buttons=document.getElementsByClassName("title_main_inside_controls_button");
    title_control_buttons[title_control_buttons.length-this.$props.selectedButton].style.color="rgb(0,120,215)";
    var title_control_buttons=document.getElementsByClassName("title_main_inside_controls_button_decline");
    title_control_buttons[title_control_buttons.length-this.$props.selectedButton].style.visibility="visible";

  }
}
</script>

<style scoped>

.title_main_inside_controls_fengexian_inside{
  background-color: darkgray;
  width: 1px;
  height: 40px;
  margin-top: 20px;
}

.title_main_inside_controls_fengexian{
  width: 1px;
  height: 80px;
  display: inline-block;
  float: right;
  margin-left: 10px;
  margin-right: 10px;
}

.title_main_inside_controls_button:hover{
  background-color: rgba(0, 0, 0, 0.1);
}

.title_main_inside_controls_button:active{
  scale: 97%;
}

.title_main_inside_controls_button_decline{
  width: 100%;
  height: 3px;
  background-color: rgb(0,120,215);
  margin-top: 2px;
  visibility: hidden;
}

.title_main_inside_controls_button>span{
  display: inline-block;
  height: 70px;
  line-height: 70px;
  margin-top: 5px;
}

.title_main_inside_controls_button{
  width: 80px;
  text-align: center;
  cursor: pointer;
  color: rgb(20,20,20);
  height: 80px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 3px;
  transition: all 0.1s;
  display: inline-block;
  float: right;
}

.title_main_inside_controls{
  height: 80px;
  float: right;

}

.title_main_inside>p{
    line-height: 80px;
    font-size: 24px;
  display: inline-block;

}

.title_main{
  width: 100%;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(40px);
  text-align: center;
  z-index: 1000;
}

.title_main_inside{
  height: 80px;
  width: 1200px;
  text-align: left;
  display: inline-block;
}

</style>